/* USER CODE BEGIN Header */
/**
  ******************************************************************************
  * @file           : main.h
  * @brief          : Header for main.c file.
  *                   This file contains the common defines of the application.
  ******************************************************************************
  * @attention
  *
  * Copyright (c) 2022 STMicroelectronics.
  * All rights reserved.
  *
  * This software is licensed under terms that can be found in the LICENSE file
  * in the root directory of this software component.
  * If no LICENSE file comes with this software, it is provided AS-IS.
  *
  ******************************************************************************
  */
/* USER CODE END Header */

/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __MAIN_H
#define __MAIN_H

#ifdef __cplusplus
extern "C" {
#endif

/* Includes ------------------------------------------------------------------*/
#include "stm32f4xx_hal.h"

/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */

/* USER CODE END Includes */

/* Exported types ------------------------------------------------------------*/
/* USER CODE BEGIN ET */

/* USER CODE END ET */

/* Exported constants --------------------------------------------------------*/
/* USER CODE BEGIN EC */

/* USER CODE END EC */

/* Exported macro ------------------------------------------------------------*/
/* USER CODE BEGIN EM */

/* USER CODE END EM */

/* Exported functions prototypes ---------------------------------------------*/
void Error_Handler(void);

/* USER CODE BEGIN EFP */

/* USER CODE END EFP */

/* Private defines -----------------------------------------------------------*/
#define LED_A_Pin GPIO_PIN_8
#define LED_A_GPIO_Port GPIOG
#define LED_B_Pin GPIO_PIN_7
#define LED_B_GPIO_Port GPIOG
#define LED_C_Pin GPIO_PIN_6
#define LED_C_GPIO_Port GPIOG
#define LED_D_Pin GPIO_PIN_5
#define LED_D_GPIO_Port GPIOG
#define LED_E_Pin GPIO_PIN_4
#define LED_E_GPIO_Port GPIOG
#define LED_F_Pin GPIO_PIN_3
#define LED_F_GPIO_Port GPIOG
#define LED_G_Pin GPIO_PIN_2
#define LED_G_GPIO_Port GPIOG
#define LED_H_Pin GPIO_PIN_1
#define LED_H_GPIO_Port GPIOG
#define LED_RED_Pin GPIO_PIN_11
#define LED_RED_GPIO_Port GPIOE
#define LED_GREEN_Pin GPIO_PIN_14
#define LED_GREEN_GPIO_Port GPIOF
/* USER CODE BEGIN Private defines */
#define LED_A_OFF 	HAL_GPIO_WritePin(GPIOG, LED_A_Pin, GPIO_PIN_SET)
#define LED_A_ON 		HAL_GPIO_WritePin(GPIOG, LED_A_Pin, GPIO_PIN_RESET)
	
#define LED_B_OFF 	HAL_GPIO_WritePin(GPIOG, LED_B_Pin, GPIO_PIN_SET)
#define LED_B_ON 		HAL_GPIO_WritePin(GPIOG, LED_B_Pin, GPIO_PIN_RESET)

#define LED_C_OFF		HAL_GPIO_WritePin(GPIOG, LED_C_Pin, GPIO_PIN_SET)
#define LED_C_ON 		HAL_GPIO_WritePin(GPIOG, LED_C_Pin, GPIO_PIN_RESET)
	
#define LED_D_OFF 	HAL_GPIO_WritePin(GPIOG, LED_D_Pin, GPIO_PIN_SET)
#define LED_D_ON 		HAL_GPIO_WritePin(GPIOG, LED_D_Pin, GPIO_PIN_RESET)
	
#define LED_E_OFF 	HAL_GPIO_WritePin(GPIOG, LED_E_Pin, GPIO_PIN_SET)
#define LED_E_ON 		HAL_GPIO_WritePin(GPIOG, LED_E_Pin, GPIO_PIN_RESET)

#define LED_F_OFF 	HAL_GPIO_WritePin(GPIOG, LED_F_Pin, GPIO_PIN_SET)
#define LED_F_ON 		HAL_GPIO_WritePin(GPIOG, LED_F_Pin, GPIO_PIN_RESET)
	
#define LED_G_OFF 	HAL_GPIO_WritePin(GPIOG, LED_G_Pin, GPIO_PIN_SET)
#define LED_G_ON 		HAL_GPIO_WritePin(GPIOG, LED_G_Pin, GPIO_PIN_RESET)
	
#define LED_H_OFF 	HAL_GPIO_WritePin(GPIOG, LED_H_Pin, GPIO_PIN_SET)
#define LED_H_ON 		HAL_GPIO_WritePin(GPIOG, LED_H_Pin, GPIO_PIN_RESET)

#define	LED_ALL_OFF	LED_A_OFF;LED_B_OFF;LED_C_OFF;LED_D_OFF;LED_E_OFF;LED_F_OFF;LED_G_OFF;LED_H_OFF;
#define LED_ALL_ON	LED_A_ON;LED_B_ON;LED_C_ON;LED_D_ON;LED_E_ON;LED_F_ON;LED_G_ON;LED_H_ON;

#define LED_GREEN_OFF HAL_GPIO_WritePin(GPIOF, LED_GREEN_Pin, GPIO_PIN_SET)
#define LED_GREEN_ON HAL_GPIO_WritePin(GPIOF, LED_GREEN_Pin, GPIO_PIN_RESET)

#define LED_RED_OFF HAL_GPIO_WritePin(GPIOE, LED_RED_Pin, GPIO_PIN_SET)
#define LED_RED_ON HAL_GPIO_WritePin(GPIOE, LED_RED_Pin, GPIO_PIN_RESET)
/* USER CODE END Private defines */

#ifdef __cplusplus
}
#endif

#endif /* __MAIN_H */
